package com.example.tushu.Pojo;

import lombok.Data;

@Data
public class JsonResult {
    private int code;
    public  String msg;
    public Object data;

    public JsonResult(int code, String msg, Object data) {
        this.code = code;
        this.msg = msg;
        this.data = data;
    }
    public JsonResult(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }
    public JsonResult( Object data) {
        this.code = 200;
        this.msg = "操作成功";
        this.data = data;
    }
    public JsonResult(String msg, Object data) {
        this.code = 200;
        this.msg = msg;
        this.data = data;
    }

}
